<%@page import="edu.cibertec.alquiler.bean.CarritoBean"%>
<%@page import="java.util.ArrayList"%>
<%@page import="com.opensymphony.xwork2.ActionContext"%>
<%@page import="java.util.Map"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script src="js/jquery-1.5.1.min.js" type="text/javascript"></script>
		<script src="js/jquery-ui-1.8.14.custom.min.js" type="text/javascript"></script>
		<link href="css/redmond/jquery-ui-1.8.14.custom.css" rel="stylesheet" type="text/css"/>
		<!--script src="js/jquery.lint.js" type="text/javascript" charset="utf-8"></script-->
		<link rel="stylesheet" href="css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
		<script src="js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
<link href="css/Renx.css" rel="stylesheet" type="text/css"/>

<script type="text/javascript" charset="utf-8">
  $(document).ready(function(){
	  $("#button").button();
	$("#button").click(function(){

		window.location.href = 'Comprar';

		});
    	
  });
</script>



<title>Insert title here</title>
<%
Map<String, Object> lasesion = ActionContext.getContext().getSession();
ArrayList<CarritoBean> carrito = (ArrayList<CarritoBean>) lasesion.get("carrito");

%>

</head>
<body>
<div class="contenidoIndex">
	<div class="lg_blockbuster"><a href="portalVideo.jsp"><img src="images/lg_blockbuster.png" alt="Blockbuster desarrollo" width="202" height="141" border="0"></a></div>
	<div class="bloque01">
            <div class="nav01">

            </div>
            <div class="cont_buscar">
              <div class="icon_lupa"></div>
              <form class="form_buscar" method="post"  action="filtraVideos">                
	            
                
                       
                <fieldset class="search-fieldset">
                  <input type="text" value="Pelicula/Actor/Director" name="filtro.titulo" />
                </fieldset>
             
                <img src="images/bt_ir.png" class="bt_ir">
			    <span id="spancito" style="background:transparent; z-index:101; float:left; position: relative; top: -2px; left: 0px; margin-bottom:1px;">
			    </span>                 
                </form>
            </div><!-- final "cont_buscar"-->
          <div class="slogan04"></div>
          </div>
          <div class="bloque02">
          <div><div>
          
       
          
          
          <div class="cont_carrito">
            <div class="icon_carrito"></div>
            <%
            
            
            if(carrito==null){
            %>
            <div class="bt_productos"><a href="carrito.jsp">No hay productos en el carrito.</a></div>
            <%}else{ %>
            <div class="bt_productos"><a href="carrito.jsp">Usted Tiene <%=carrito.size()%> videos en el carrito.</a></div>
            <%} %>
          </div>
        </div><!-- final "bloque02"--> 
      </div>
        </div>


	
	
	
		<div>
			<div class="contVideos">
	<br><br><br>
		
				<div class="videoItem">
					<table align="center" border="1" bordercolor="white">
					<tr>
					<td class="negrita">Codigo Video</td>
					<td class="negrita">Nombre Video</td>
					<td class="negrita">Dias</td>
					</tr>
					<% for(int i=0;i<carrito.size();i++){ 
						CarritoBean  c = new CarritoBean();
						c = carrito.get(i);
					%>
					
					<tr>
					<td> <%=c.getCodVideo()%></td>
					<td><%=c.getNomVideo()%></td>
					<td><%=c.getDias()%></td>
					<td><a href="eliminarDeCarrito?id=<%=i%>">Eliminar</a></td>
					</tr>
					
					<%} %>
					
					</table>
					
					<button  id="button"> Comprar</button>
					
					
				</div>
		
			</div>
		</div>
		
</div>
</body>
</html>